3.231 \(\int \cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx\)

Optimal. Leaf size=80 \[ \frac {\sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )} E\left (\sin ^{-1}(\sin (e+f x))|\frac {a}{a+b}\right )}{f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}} \]

[Out]

EllipticE(sin(f*x+e),(a/(a+b))^(1/2))*(cos(f*x+e)^2)^(1/2)*(sec(f*x+e)^2*(a+b-a*sin(f*x+e)^2))^(1/2)/f/(1-a*si
n(f*x+e)^2/(a+b))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 103, normalized size of antiderivative = 1.29, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {4148, 6722, 1974, 426, 424} \[ \frac {\sqrt {\cos ^2(e+f x)} \sqrt {-a \sin ^2(e+f x)+a+b} \sqrt {a+b \sec ^2(e+f x)} E\left (\sin ^{-1}(\sin (e+f x))|\frac {a}{a+b}\right )}{f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}} \sqrt {a \cos ^2(e+f x)+b}} \]

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]*Sqrt[a + b*Sec[e + f*x]^2],x]

[Out]

(Sqrt[Cos[e + f*x]^2]*EllipticE[ArcSin[Sin[e + f*x]], a/(a + b)]*Sqrt[a + b*Sec[e + f*x]^2]*Sqrt[a + b - a*Sin
[e + f*x]^2])/(f*Sqrt[b + a*Cos[e + f*x]^2]*Sqrt[1 - (a*Sin[e + f*x]^2)/(a + b)])

Rule 424

Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[(Sqrt[a]*EllipticE[ArcSin[Rt[-(d/c)
, 2]*x], (b*c)/(a*d)])/(Sqrt[c]*Rt[-(d/c), 2]), x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[
a, 0]

Rule 426

Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Dist[Sqrt[a + b*x^2]/Sqrt[1 + (b*x^2)/a]
, Int[Sqrt[1 + (b*x^2)/a]/Sqrt[c + d*x^2], x], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] &&  !GtQ
[a, 0]

Rule 1974

Int[(u_)^(p_.)*(v_)^(q_.), x_Symbol] :> Int[ExpandToSum[u, x]^p*ExpandToSum[v, x]^q, x] /; FreeQ[{p, q}, x] &&
 BinomialQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0] &&  !BinomialMatchQ[{u, v}, x]

Rule 4148

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fr
eeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + b/(1 - ff^2*x^2)^(n/2))^p/(1 - ff^2*x^2)^((m + 1)/2), x
], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] &&  !IntegerQ
[p]

Rule 6722

Int[(u_.)*((a_.) + (b_.)*(v_)^(n_))^(p_), x_Symbol] :> Dist[(a + b*v^n)^FracPart[p]/(v^(n*FracPart[p])*(b + a/
v^n)^FracPart[p]), Int[u*v^(n*p)*(b + a/v^n)^p, x], x] /; FreeQ[{a, b, p}, x] &&  !IntegerQ[p] && ILtQ[n, 0] &
& BinomialQ[v, x] &&  !LinearQ[v, x]

Rubi steps

\begin {align*} \int \cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \, dx &=\frac {\operatorname {Subst}\left (\int \sqrt {a+\frac {b}{1-x^2}} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\left (\sqrt {\cos ^2(e+f x)} \sqrt {a+b \sec ^2(e+f x)}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {b+a \left (1-x^2\right )}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{f \sqrt {b+a \cos ^2(e+f x)}}\\ &=\frac {\left (\sqrt {\cos ^2(e+f x)} \sqrt {a+b \sec ^2(e+f x)}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {a+b-a x^2}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{f \sqrt {b+a \cos ^2(e+f x)}}\\ &=\frac {\left (\sqrt {\cos ^2(e+f x)} \sqrt {a+b \sec ^2(e+f x)} \sqrt {a+b-a \sin ^2(e+f x)}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {1-\frac {a x^2}{a+b}}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{f \sqrt {b+a \cos ^2(e+f x)} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}\\ &=\frac {\sqrt {\cos ^2(e+f x)} E\left (\sin ^{-1}(\sin (e+f x))|\frac {a}{a+b}\right ) \sqrt {a+b \sec ^2(e+f x)} \sqrt {a+b-a \sin ^2(e+f x)}}{f \sqrt {b+a \cos ^2(e+f x)} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.26, size = 69, normalized size = 0.86 \[ \frac {\sqrt {2} \cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} E\left (e+f x\left |\frac {a}{a+b}\right .\right )}{f \sqrt {\frac {a \cos (2 (e+f x))+a+2 b}{a+b}}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[e + f*x]*Sqrt[a + b*Sec[e + f*x]^2],x]

[Out]

(Sqrt[2]*Cos[e + f*x]*EllipticE[e + f*x, a/(a + b)]*Sqrt[a + b*Sec[e + f*x]^2])/(f*Sqrt[(a + 2*b + a*Cos[2*(e
+ f*x)])/(a + b)])

________________________________________________________________________________________

fricas [F]  time = 0.70, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\sqrt {b \sec \left (f x + e\right )^{2} + a} \cos \left (f x + e\right ), x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

integral(sqrt(b*sec(f*x + e)^2 + a)*cos(f*x + e), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b \sec \left (f x + e\right )^{2} + a} \cos \left (f x + e\right )\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(b*sec(f*x + e)^2 + a)*cos(f*x + e), x)

________________________________________________________________________________________

maple [C]  time = 2.02, size = 3408, normalized size = 42.60 \[ \text {output too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)*(a+b*sec(f*x+e)^2)^(1/2),x)

[Out]

-1/2/f*(2*I*sin(f*x+e)*a^(3/2)*b^(1/2)*2^(1/2)*((I*a^(1/2)*b^(1/2)*cos(f*x+e)-I*a^(1/2)*b^(1/2)+a*cos(f*x+e)+b
)/(1+cos(f*x+e))/(a+b))^(1/2)*(-2*(I*a^(1/2)*b^(1/2)*cos(f*x+e)-I*a^(1/2)*b^(1/2)-a*cos(f*x+e)-b)/(1+cos(f*x+e
))/(a+b))^(1/2)*EllipticF((-1+cos(f*x+e))*((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)/sin(f*x+e),(-(4*I*a^(3/2)*b^
(1/2)-4*I*a^(1/2)*b^(3/2)-a^2+6*a*b-b^2)/(a+b)^2)^(1/2))+2*2^(1/2)*((I*a^(1/2)*b^(1/2)*cos(f*x+e)-I*a^(1/2)*b^
(1/2)+a*cos(f*x+e)+b)/(1+cos(f*x+e))/(a+b))^(1/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f*x+e)^2*a^(3/2)*b^(1/2)*((2*I*a^(1/2)*b^(1
/2)+a-b)/(a+b))^(1/2))*cos(f*x+e)*((b+a*cos(f*x+e)^2)/cos(f*x+e)^2)^(1/2)/(b+a*cos(f*x+e)^2)/sin(f*x+e)/((2*I*
a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)/(2*I*a^(1/2)*b^(1/2)-a+b)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b \sec \left (f x + e\right )^{2} + a} \cos \left (f x + e\right )\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(b*sec(f*x + e)^2 + a)*cos(f*x + e), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \cos \left (e+f\,x\right )\,\sqrt {a+\frac {b}{{\cos \left (e+f\,x\right )}^2}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(e + f*x)*(a + b/cos(e + f*x)^2)^(1/2),x)

[Out]

int(cos(e + f*x)*(a + b/cos(e + f*x)^2)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a + b \sec ^{2}{\left (e + f x \right )}} \cos {\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(a+b*sec(f*x+e)**2)**(1/2),x)

[Out]

Integral(sqrt(a + b*sec(e + f*x)**2)*cos(e + f*x), x)

________________________________________________________________________________________